Fix ping with large/fragmented packets from domU to dom0.
tx->size = skb->len;
wmb(); /* Ensure that backend will see the request. */
- np->tx->req_prod = i + 1;
+ i++;
+ np->tx->req_prod = i;
network_tx_buf_gc(dev);
- if ( (i - np->tx_resp_cons) == (NETIF_TX_RING_SIZE - 1) )
+ if ( (i - np->tx_resp_cons) == NETIF_TX_RING_SIZE )
{
np->tx_full = 1;
netif_stop_queue(dev);
/* Only notify Xen if there are no outstanding responses. */
mb();
- if ( np->tx->resp_prod == i )
+ if ( np->tx->resp_prod != i )
notify_via_evtchn(np->evtchn);
return 0;